package com.iwunu.gateway.repository;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.iwunu.gateway.entity.SystemUser;

import io.lettuce.core.dynamic.annotation.Param;

/**
 * @author kinfeng
 * @date 2021/3/18 10:00 AM
 * @desc
 */
@Repository
public interface SystemUserRepository extends JpaRepository<SystemUser, Long> , JpaSpecificationExecutor<SystemUser> {
	
	   @Query(value="select i from SystemUser i where i.phone=:phone and i.parentId = 1")
	   SystemUser selectSystemUserByPhone(@Param("phone") String phone);
	    

}


